#ifndef _DBF_H_
#define _DBF_H_

#pragma pack(1)

typedef struct dbf_head 			/* DBF */
{ 
	char vers; 						/* 版本	*/ 
	char ymd[3];					/*  */ 
	unsigned long record_counts; 	/* 记录条数 */ 
	unsigned short header_size;		/* 头偏移位置 */
	unsigned short record_size; 	/* 每条记录大小 */ 
	char reserved[20]; 				/* 保留 */ 
}DBF_HEAD;

typedef struct field_descriptors 		/*  */
{ 
	char field_name[11]; 				/* 名称 */ 
	char field_type; 					/* 类型 */ 
	unsigned short field_offset; 		/* 记录项偏移地址 */ 
	char non[2];
	unsigned char field_length; 		/* 记录项长度 */ 
	unsigned char field_decimal; 		/* 记录项精度 */ 
	char reserved1[2];					/* 保留 */ 
	char dbaseiv_id;					/* dBASE IV work area id */ 
	char reserved2[10];					/* */
	char production_index; 
}DBF_FIELD;

struct stock_quote
{
	short			mt;
    int			    date;
    int			    time;

    char		    code[7];	//证券代码
    char		    name[13];	//证券名称
    float			last_close;	//前收盘价格
    float			open;		//开盘价
	long			amount;		//今成交金额
    float			high;		//最高价
    float			low;		//最低价
    float			now;		//最新价
    int				volume;		//今成交量
	float 			rate;		//市盈率
    float			bid1;
	int 			bid1_vol;
    float			bid2;
    int 			bid2_vol;
    float			bid3;
    int 			bid3_vol;
    float			bid4;
    int 			bid4_vol;
    float			bid5;
    int 			bid5_vol;
    float			ask1;
    int 			ask1_vol;
    float			ask2;
    int 			ask2_vol;
    float			ask3;
    int 			ask3_vol;
    float			ask4;
    int 			ask4_vol;
    float			ask5;
    int 			ask5_vol;       
};

#pragma pack()

#endif

